package com.zorn.platform.user.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Service;

import com.zorn.core.spring.mvc.support.ServiceSupport;
import com.zorn.platform.user.dao.UserComponentDao;
import com.zorn.platform.user.service.IUserComponentService;

@Service
public class UserComponentService extends ServiceSupport implements IUserComponentService {

	/* Fields
	================================================== */
	private UserComponentDao userComponentDao;

	/* Methods
	================================================== */
	public List<Map<String, Object>> query(Map<String, Object> params) {
		return setQueryResult(userComponentDao.query(params), userComponentDao.count(params));
	}

	public int count(Map<String, Object> params) {
		return setCountResult(userComponentDao.count(params));
	}

	public int insert(Map<String, Object> params) {
		return setInsertResult(userComponentDao.insert(params), 0);
	}

	public int update(Map<String, Object> params) {
		return setUpdateResult(userComponentDao.update(params));
	}

	public int delete(Map<String, Object> params) {
		return setDeleteResult(userComponentDao.delete(params));
	}

	@Override
	public List<Map<String, Object>> getComponents(Map<String, Object> params) {

		return null;
	}

	/* Getters & Setters
	================================================== */
	public void setUserComponentDao(UserComponentDao userComponentDao) {
		this.userComponentDao = userComponentDao;
	}

}